<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        * {
            padding: 0;
            margin: 0;
        }

        div {
            width: 500px;
            height: 500px;
            background-color: skyblue;
        }
    </style>


</head>

<body>

    <button>开始动画</button>
    <button>stop</button>
    <button>finish</button>

    <div></div>
    <!--   颜色   transfrom 不行 -->


    <script src="./jquery/jquery-3.6.0.min.js"></script>
    <script>
    //  结束动画


    $('button:nth-child(1)').click(function(){


        $('div').stop().toggle(3000)
        $('div').finish().toggle(3000)
    })

    $('button:nth-child(2)').click(function(){


        $('div').stop()
    })

    $('button:nth-child(3)').click(function(){


        $('div').finish()
    })
    </script>
</body>

</html>